package com.gxa.service.receipt.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.gxa.entity.receipt.Bill;

import com.gxa.mapper.receipt.BillMapper;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxa.service.receipt.BillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yjl
 * @since 2022-10-12 11:43:53
 */
@Service
public class BillServiceImpl extends ServiceImpl<BillMapper, Bill> implements BillService {

    @Autowired
    private BillMapper billMapper;


    @Override
    public void add(Bill bill) {
        this.billMapper.insert(bill);
    }

    @Override
    public void delete(Integer id) {
        this.billMapper.deleteById(id);
    }

    @Override
    public void update(Bill bill) {
        this.updateById(bill);
    }

    @Override
    public List<Bill> quetAll() {
        List<Bill> bills = this.billMapper.selectList(null);
        return bills;
    }

    @Override
    public List<Bill> queryByname(String name) {
        System.out.println(name);
        List<Bill> bills = this.billMapper.queryByName(name);
        return bills;
    }
}
